package core.place;


/**
 * Class PlaceTCPIP : Represents where the file to copy is for the TCP/IP protocol
 * @project Universalcopy
 * @author Aurele TONNERRE, Romain Monnier
 */
public class PlaceTCPIP extends Place {
    
    private int port;
    private String login;
    private String password;
    
    
    /**
     * Constructs a new place representing where the file to copy is, with informations for tcp/ip connection
     * @param theUrl : the url of the file
     * @param port : the port of the server
     * @param login : the login to connect on the server
     * @param passwd : the password to connect on the server
     */
    public PlaceTCPIP(String theUrl, int port, String login, String passwd) {
        
        super(theUrl);
        this.port = port;
        this.login = login;
        this.password = passwd;
    }
    
    
    /**
     * Returns the port of the server for the connection
     * @return port
     */
    public int getPort() {
        return this.port;
    }
    
    
    /**
     * Changes the number of the port
     * @param thePort : the port number
     */
    public void setPort(int thePort) {
        this.port = thePort;
    }
    
    
    /**
     * Returns the login of the connection
     * @return login
     */
    public String getLogin() {
        return this.login;
    }
    
    
    /**
     * Changes the login
     * @param theLogin : the login
     */
    public void setLogin(String theLogin) {
        this.login = theLogin;
    }
    
    
    /**
     * Returns the password of the connection
     * @return password
     */
    public String getPassword() {
        return this.password;
    }
    
    /**
     * Changes the password of the connection
     * @param thePassword 
     */
    public void setPassword(String thePassword) {
        this.password = thePassword;
    }
    
    
}
